package huajiu.com.base;

import java.io.File;

/**
 * 常量
 * 
 * @category author xiangyong.ding@weimob.com
 * @since 2017年3月16日 下午12:02:44
 */
public class CommonConstant {
	public interface RedisKey {
		String GOODS_STORE_BY_ID = "GOODS_STORE_BY_GOODS_ID_{0}";

		String GOODS_INFO_BY_ID = "GOODS_INFO_BY_GOODS_ID_{0}";

		// IP黑名单
		String IP_BLACK_LIST = "IP_BLACK_LIST";

		// 用户黑名单
		String USER_BLACK_LIST = "USER_BLACK_LIST";


		// redis库存
		String REDIS_GOODS_STORE = "REDIS_GOODS_STORE_GOODS_RANDOM_NAME:{0}";

		// redis占位成功下单token
		String MIAOSHA_SUCCESS_TOKEN = "MIAOSHA_SUCCESS_TOKEN_MOBILE:{0}_GOODS_RANDOM_NAME:{1}_";

		// redis占位成功下单token前缀
		String MIAOSHA_SUCCESS_TOKEN_PREFIX = "MIAOSHA_SUCCESS_TOKEN_MOBILE";


	}

	public interface RedisKeyExpireSeconds {
		int GOODS_STORE_BY_ID = 3 * 24 * 60 * 60;
	}
	
	public interface RequestType{
		
		String GET ="GET";
		
		String POST ="POST";
	}
	public interface Physical{
	
		String QI_XU_ZHI ="气虚质";
		
		String YIN_XU_ZHI ="阴虚质";
		
		String YANG_XU_ZHI="阳虚质";
		
		String TAN_SHI_ZHI ="痰湿质";
		
		String SHI_RE_ZHI ="湿热质";
		
		String QI_YU_ZHI ="气郁质";
		
		String XUE_YU_ZHI ="血淤质";
		
		String TE_BIN_ZHI ="特禀质";
		
		String PING_HE_ZHI ="平和质";
	}

	public interface Emotion{
		
		String PING_JING ="平静";
		
		String GAO_XIN ="高兴";
		
		String SHANG_XIN ="伤心";
		
		String JING_YA ="惊讶";
		
		String SHENG_QI ="生气";
		
		String YAN_WU ="厌恶";
		
		String HAI_PA ="害怕";
	}
	
	/**
	 * 限流倍数
	 * 
	 * @category 限流倍数
	 * @author xiangyong.ding@weimob.com
	 * @since 2017年3月16日 下午2:08:54
	 */
	public interface CurrentLimitMultiple {
		// 商品购买限流倍数
		int GOODS_BUY = 1;
	}

	// 服务器账户
	public static final String CdSystem_APP_Key = "app_key";
	// 服务器密码
	public static final String CdSystem_APP_Pwd = "app_pwd";
	
	public static final int ISNULL=-1;
	
	public static final String CHARSET_NAME_UTF_8 ="utf-8";
	
	public static final String SAVE_URL_TO_SEVER = File.separator+"opt"+File.separator+"tomcat"+File.separator+"webapps"+File.separator+"images";
	
	public static final String SAVE_URL_TO_LOCAL_STRING ="http://112.124.70.208:8081"+File.separator+"images";
	
	public static final int INIT_API_VALUE = 0;
	/**
	 * cookie id
	 */
	public static final String COOKIE_NAME = "MIAOSHA_ID";

	/**
	 * token有效期，单位：毫秒
	 */
	public static final long TOKEN_EFECTIVE_MILLISECONDS = 3 * 60 * 1000;
}
